n=int(input())
a=list(map(int,input().split()))
juicy=int(input())
jarr=list(map(int,input().split()))
pre=[]
count=0
for i in a:
count+=1
for j in range(i):
pre.append(count)
for i in jarr:
print(pre[i-1])
#include<iostream>
using namespace std;
int main(){
int a, sum=0, b;
cin>>a;
int f[a];
for(int i=0; i<a; i++){
cin>>b;
sum+=b;
f[i]=sum;
// cout<<f[i]<<endl;
}
// cout<<endl;
int c=0, d, cacing[sum+1];
for(int i=1; i<=sum; i++){
if(i>f[c]){
c++;
}
cacing[i]=c+1;
// cout<<cacing[i]<<endl;
}
cin>>d; int e;
for(int i=0; i<d; i++){
cin>>e;
cout<<cacing[e]<<endl;
}
}
1627B - Not Sitting | 1663C - Pōja Verdon |
1497A - Meximization | 1633B - Minority |
688B - Lovely Palindromes | 66B - Petya and Countryside |
1557B - Moamen and k-subarrays | 540A - Combination Lock |
1553C - Penalty | 1474E - What Is It |
1335B - Construct the String | 1004B - Sonya and Exhibition |
1397A - Juggling Letters | 985C - Liebig's Barrels |
115A - Party | 746B - Decoding |
1424G - Years | 1663A - Who Tested |
1073B - Vasya and Books | 195B - After Training |
455A - Boredom | 1099A - Snowball |
1651D - Nearest Excluded Points | 599A - Patrick and Shopping |
237A - Free Cash | 1615B - And It's Non-Zero |
1619E - MEX and Increments | 34B - Sale |
1436A - Reorder | 1363C - Game On Leaves |